@echo off
echo ========================================
echo 测试SQL修复
echo ========================================

echo.
echo 1. 检查后端服务状态...
netstat -an | findstr :8080
if %errorlevel% neq 0 (
    echo 后端服务未运行，请先启动后端服务
    pause
    exit /b 1
)

echo.
echo 2. 测试修复后的查询...
echo 测试基本列表查询...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5"

echo.
echo 3. 测试搜索功能...
echo 测试护理员搜索...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5&caregiver_name=user07"

echo.
echo 4. 测试状态筛选...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5&status=待执行"

echo.
echo 5. 测试组合查询...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5&caregiver_name=user07&nursing_item_name=助餐&status=待执行"

echo.
echo 测试完成！
echo 如果不再出现SQL错误，说明修复成功
pause
